#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n;
    scanf("%d",&n);
    switch(n/10)
    {
        case 10:if(n>100)goto aa;
        case 9:printf("A");break;
        case 8:printf("B");break;
        case 7:printf("C");break;
        case 6:printf("D");break;
        case 5:
        case 4:
        case 3:
        case 2:
        case 1:
        case 0:if(n<0)goto aa;
        printf("E");break;
        aa:default:printf("error");
    }
    return 0;
}
